<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::QpMcLinear&lt; InputT &gt; Class Template Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="classshark_1_1_qp_mc_linear.html">QpMcLinear</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classshark_1_1_qp_mc_linear-members.html">List of all members</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle"><div class="title">shark::QpMcLinear&lt; InputT &gt; Class Template Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div></div>
</div><!--header-->
<div class="contents">

<p>Generic solver skeleton for linear multi-class SVM problems.  
 <a href="classshark_1_1_qp_mc_linear.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_qp_mc_linear_8h_source.html">shark/Algorithms/QP/QpMcLinear.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for shark::QpMcLinear&lt; InputT &gt;:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classshark_1_1_qp_mc_linear__inherit__graph.png" border="0" usemap="#ashark_1_1_qp_mc_linear_3_01_input_t_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="ashark_1_1_qp_mc_linear_3_01_input_t_01_4_inherit__map" id="ashark_1_1_qp_mc_linear_3_01_input_t_01_4_inherit__map">
<area shape="rect" title="Generic solver skeleton for linear multi&#45;class SVM problems." alt="" coords="5,235,145,275"/>
<area shape="rect" href="classshark_1_1_qp_mc_linear_a_d_m.html" title="Solver for the multi&#45;class SVM with absolute margin and discriminative maximum loss." alt="" coords="209,5,371,46"/>
<area shape="poly" title=" " alt="" coords="86,219,102,181,125,138,154,95,191,57,211,44,213,49,194,61,158,98,129,141,107,184,91,221"/>
<area shape="rect" href="classshark_1_1_qp_mc_linear_a_t_m.html" title="Solver for the multi&#45;class SVM with absolute margin and total maximum loss." alt="" coords="211,71,369,111"/>
<area shape="poly" title=" " alt="" coords="96,220,137,170,163,144,191,122,214,110,217,114,194,127,166,148,141,174,100,224"/>
<area shape="rect" href="classshark_1_1_qp_mc_linear_a_t_s.html" title="Solver for the multi&#45;class SVM with absolute margin and total sum loss." alt="" coords="212,136,368,177"/>
<area shape="poly" title=" " alt="" coords="121,224,192,187,222,175,224,180,194,192,124,229"/>
<area shape="rect" href="classshark_1_1_qp_mc_linear_c_s.html" title="Solver for the multi&#45;class SVM by Crammer &amp; Singer." alt="" coords="215,201,365,242"/>
<area shape="poly" title=" " alt="" coords="160,239,214,231,215,236,160,244"/>
<area shape="rect" href="classshark_1_1_qp_mc_linear_l_l_w.html" title="Solver for the multi&#45;class SVM by Lee, Lin &amp; Wahba." alt="" coords="211,267,369,307"/>
<area shape="poly" title=" " alt="" coords="161,265,211,273,210,278,160,270"/>
<area shape="rect" href="classshark_1_1_qp_mc_linear_m_m_r.html" title="Solver for the multi&#45;class maximum margin regression SVM." alt="" coords="208,332,372,373"/>
<area shape="poly" title=" " alt="" coords="125,281,194,317,224,329,222,334,192,321,122,286"/>
<area shape="rect" href="classshark_1_1_qp_mc_linear_reinforced.html" title="Solver for the &quot;reinforced&quot; multi&#45;class SVM." alt="" coords="193,397,387,438"/>
<area shape="poly" title=" " alt="" coords="101,287,141,336,166,361,194,382,217,394,214,399,191,387,163,365,137,339,97,290"/>
<area shape="rect" href="classshark_1_1_qp_mc_linear_w_w.html" title="Solver for the multi&#45;class SVM by Weston &amp; Watkins." alt="" coords="211,463,369,503"/>
<area shape="poly" title=" " alt="" coords="91,289,107,326,129,369,159,411,194,448,214,460,211,464,191,452,154,414,125,371,102,328,86,291"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a844cac01d9113019e1f89de7d0810d79" id="r_a844cac01d9113019e1f89de7d0810d79"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a844cac01d9113019e1f89de7d0810d79">CoordinateSelectionStrategy</a> { <a class="el" href="classshark_1_1_qp_mc_linear.html#a844cac01d9113019e1f89de7d0810d79ac281d0b5f356d094aa5ad039e28cdc35">UNIFORM</a>
, <a class="el" href="classshark_1_1_qp_mc_linear.html#a844cac01d9113019e1f89de7d0810d79a306e16139b81caaa99ea79d3ede9a712">ACF</a>
 }</td></tr>
<tr class="separator:a844cac01d9113019e1f89de7d0810d79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09a8a598fe1e6c6c625be0c55b03985a" id="r_a09a8a598fe1e6c6c625be0c55b03985a"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; InputT, unsigned int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a09a8a598fe1e6c6c625be0c55b03985a">DatasetType</a></td></tr>
<tr class="separator:a09a8a598fe1e6c6c625be0c55b03985a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8da0d0f5ee8a849b350304e391ae0ea1" id="r_a8da0d0f5ee8a849b350304e391ae0ea1"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; InputT, unsignedint &gt;::const_element_reference&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a8da0d0f5ee8a849b350304e391ae0ea1">ElementType</a></td></tr>
<tr class="separator:a8da0d0f5ee8a849b350304e391ae0ea1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88e09c2e6decd1e35f0755f0faf982f7" id="r_a88e09c2e6decd1e35f0755f0faf982f7"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structshark_1_1_batch.html">Batch</a>&lt; InputT &gt;::const_reference&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a88e09c2e6decd1e35f0755f0faf982f7">InputReferenceType</a></td></tr>
<tr class="separator:a88e09c2e6decd1e35f0755f0faf982f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a257f16d453818fb33a9b32d8dd7c6bf2" id="r_a257f16d453818fb33a9b32d8dd7c6bf2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a257f16d453818fb33a9b32d8dd7c6bf2">QpMcLinear</a> (const <a class="el" href="classshark_1_1_qp_mc_linear.html#a09a8a598fe1e6c6c625be0c55b03985a">DatasetType</a> &amp;dataset, std::size_t dim, std::size_t classes, std::size_t strategy=<a class="el" href="classshark_1_1_qp_mc_linear.html#a844cac01d9113019e1f89de7d0810d79a306e16139b81caaa99ea79d3ede9a712">ACF</a>, bool shrinking=false)</td></tr>
<tr class="memdesc:a257f16d453818fb33a9b32d8dd7c6bf2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <br /></td></tr>
<tr class="separator:a257f16d453818fb33a9b32d8dd7c6bf2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a468f877984aab4f95122083bf4a87152" id="r_a468f877984aab4f95122083bf4a87152"><td class="memItemLeft" align="right" valign="top">RealMatrix&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a468f877984aab4f95122083bf4a87152">solve</a> (random::rng_type &amp;rng, double C, <a class="el" href="structshark_1_1_qp_stopping_condition.html">QpStoppingCondition</a> &amp;stop, <a class="el" href="structshark_1_1_qp_solution_properties.html">QpSolutionProperties</a> *prop=NULL, bool verbose=false)</td></tr>
<tr class="memdesc:a468f877984aab4f95122083bf4a87152"><td class="mdescLeft">&#160;</td><td class="mdescRight">Solve the SVM training problem.  <br /></td></tr>
<tr class="separator:a468f877984aab4f95122083bf4a87152"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-methods" name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a64edc8279169777bf9ef05052a412acd" id="r_a64edc8279169777bf9ef05052a412acd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a64edc8279169777bf9ef05052a412acd">add_scaled</a> (RealMatrix &amp;w, RealVector const &amp;mu, <a class="el" href="classshark_1_1_qp_mc_linear.html#a88e09c2e6decd1e35f0755f0faf982f7">InputReferenceType</a> x)</td></tr>
<tr class="separator:a64edc8279169777bf9ef05052a412acd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ff5650431f4502b6a76e7b79b7ff514" id="r_a6ff5650431f4502b6a76e7b79b7ff514"><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a6ff5650431f4502b6a76e7b79b7ff514">calcGradient</a> (RealVector &amp;gradient, RealVector wx, blas::dense_vector_adaptor&lt; double const &gt; const &amp;alpha, double C, unsigned int y)=0</td></tr>
<tr class="memdesc:a6ff5650431f4502b6a76e7b79b7ff514"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the gradient from the inner products of the weight vectors with the current sample.  <br /></td></tr>
<tr class="separator:a6ff5650431f4502b6a76e7b79b7ff514"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:addbaf611cbd58e4a4e3d07b80a95fbf4" id="r_addbaf611cbd58e4a4e3d07b80a95fbf4"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#addbaf611cbd58e4a4e3d07b80a95fbf4">updateWeightVectors</a> (RealMatrix &amp;w, RealVector const &amp;mu, std::size_t index)=0</td></tr>
<tr class="memdesc:addbaf611cbd58e4a4e3d07b80a95fbf4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update the weight vectors (primal variables) after a step on the dual variables.  <br /></td></tr>
<tr class="separator:addbaf611cbd58e4a4e3d07b80a95fbf4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1bd9cdcfb10e5aca7c77e16812bae92" id="r_ad1bd9cdcfb10e5aca7c77e16812bae92"><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#ad1bd9cdcfb10e5aca7c77e16812bae92">solveSub</a> (double epsilon, RealVector &amp;gradient, double q, double C, unsigned int y, blas::dense_vector_adaptor&lt; double &gt; &amp;alpha, RealVector &amp;mu)=0</td></tr>
<tr class="memdesc:ad1bd9cdcfb10e5aca7c77e16812bae92"><td class="mdescLeft">&#160;</td><td class="mdescRight">Solve the sub-problem posed by a single training example.  <br /></td></tr>
<tr class="separator:ad1bd9cdcfb10e5aca7c77e16812bae92"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:ab724fc27e23748209c439970919afdc1" id="r_ab724fc27e23748209c439970919afdc1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_data_view.html">DataView</a>&lt; const <a class="el" href="classshark_1_1_qp_mc_linear.html#a09a8a598fe1e6c6c625be0c55b03985a">DatasetType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#ab724fc27e23748209c439970919afdc1">m_data</a></td></tr>
<tr class="memdesc:ab724fc27e23748209c439970919afdc1"><td class="mdescLeft">&#160;</td><td class="mdescRight">view on training data  <br /></td></tr>
<tr class="separator:ab724fc27e23748209c439970919afdc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb2a6e9f3681450a55dd5764648d0cb6" id="r_adb2a6e9f3681450a55dd5764648d0cb6"><td class="memItemLeft" align="right" valign="top">RealVector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#adb2a6e9f3681450a55dd5764648d0cb6">m_xSquared</a></td></tr>
<tr class="memdesc:adb2a6e9f3681450a55dd5764648d0cb6"><td class="mdescLeft">&#160;</td><td class="mdescRight">diagonal entries of the quadratic matrix  <br /></td></tr>
<tr class="separator:adb2a6e9f3681450a55dd5764648d0cb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04cb0e529976e34569d0b6863e36b881" id="r_a04cb0e529976e34569d0b6863e36b881"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a04cb0e529976e34569d0b6863e36b881">m_dim</a></td></tr>
<tr class="memdesc:a04cb0e529976e34569d0b6863e36b881"><td class="mdescLeft">&#160;</td><td class="mdescRight">input space dimension  <br /></td></tr>
<tr class="separator:a04cb0e529976e34569d0b6863e36b881"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3deaa3c8d8f3b5a15ffc509ed17a0398" id="r_a3deaa3c8d8f3b5a15ffc509ed17a0398"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a3deaa3c8d8f3b5a15ffc509ed17a0398">m_classes</a></td></tr>
<tr class="memdesc:a3deaa3c8d8f3b5a15ffc509ed17a0398"><td class="mdescLeft">&#160;</td><td class="mdescRight">number of classes  <br /></td></tr>
<tr class="separator:a3deaa3c8d8f3b5a15ffc509ed17a0398"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5489cad6b7a0db6065331414ae21dc7" id="r_ab5489cad6b7a0db6065331414ae21dc7"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#ab5489cad6b7a0db6065331414ae21dc7">m_strategy</a></td></tr>
<tr class="memdesc:ab5489cad6b7a0db6065331414ae21dc7"><td class="mdescLeft">&#160;</td><td class="mdescRight">strategy for coordinate selection  <br /></td></tr>
<tr class="separator:ab5489cad6b7a0db6065331414ae21dc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4881e1ffbdb28a0f2d0fee00373e4e09" id="r_a4881e1ffbdb28a0f2d0fee00373e4e09"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_mc_linear.html#a4881e1ffbdb28a0f2d0fee00373e4e09">m_shrinking</a></td></tr>
<tr class="memdesc:a4881e1ffbdb28a0f2d0fee00373e4e09"><td class="mdescLeft">&#160;</td><td class="mdescRight">apply shrinking or not?  <br /></td></tr>
<tr class="separator:a4881e1ffbdb28a0f2d0fee00373e4e09"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;class InputT&gt;<br />
class shark::QpMcLinear&lt; InputT &gt;</div><p>Generic solver skeleton for linear multi-class SVM problems. </p>

<p class="definition">Definition at line <a class="el" href="_qp_mc_linear_8h_source.html#l00054">54</a> of file <a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a09a8a598fe1e6c6c625be0c55b03985a" name="a09a8a598fe1e6c6c625be0c55b03985a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a09a8a598fe1e6c6c625be0c55b03985a">&#9670;&#160;</a></span>DatasetType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt;InputT, unsigned int&gt; <a class="el" href="classshark_1_1_qp_mc_linear.html">shark::QpMcLinear</a>&lt; InputT &gt;::DatasetType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_qp_mc_linear_8h_source.html#l00057">57</a> of file <a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a>.</p>

</div>
</div>
<a id="a8da0d0f5ee8a849b350304e391ae0ea1" name="a8da0d0f5ee8a849b350304e391ae0ea1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8da0d0f5ee8a849b350304e391ae0ea1">&#9670;&#160;</a></span>ElementType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt;InputT,unsignedint&gt;::const_element_reference <a class="el" href="classshark_1_1_qp_mc_linear.html">shark::QpMcLinear</a>&lt; InputT &gt;::ElementType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_qp_mc_linear_8h_source.html#l00058">58</a> of file <a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a>.</p>

</div>
</div>
<a id="a88e09c2e6decd1e35f0755f0faf982f7" name="a88e09c2e6decd1e35f0755f0faf982f7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a88e09c2e6decd1e35f0755f0faf982f7">&#9670;&#160;</a></span>InputReferenceType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="structshark_1_1_batch.html">Batch</a>&lt;InputT&gt;::const_reference <a class="el" href="classshark_1_1_qp_mc_linear.html">shark::QpMcLinear</a>&lt; InputT &gt;::InputReferenceType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_qp_mc_linear_8h_source.html#l00059">59</a> of file <a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="a844cac01d9113019e1f89de7d0810d79" name="a844cac01d9113019e1f89de7d0810d79"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a844cac01d9113019e1f89de7d0810d79">&#9670;&#160;</a></span>CoordinateSelectionStrategy</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classshark_1_1_qp_mc_linear.html#a844cac01d9113019e1f89de7d0810d79">shark::QpMcLinear::CoordinateSelectionStrategy</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a844cac01d9113019e1f89de7d0810d79ac281d0b5f356d094aa5ad039e28cdc35" name="a844cac01d9113019e1f89de7d0810d79ac281d0b5f356d094aa5ad039e28cdc35"></a>UNIFORM&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a844cac01d9113019e1f89de7d0810d79a306e16139b81caaa99ea79d3ede9a712" name="a844cac01d9113019e1f89de7d0810d79a306e16139b81caaa99ea79d3ede9a712"></a>ACF&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">Definition at line <a class="el" href="_qp_mc_linear_8h_source.html#l00061">61</a> of file <a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a257f16d453818fb33a9b32d8dd7c6bf2" name="a257f16d453818fb33a9b32d8dd7c6bf2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a257f16d453818fb33a9b32d8dd7c6bf2">&#9670;&#160;</a></span>QpMcLinear()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_qp_mc_linear.html">shark::QpMcLinear</a>&lt; InputT &gt;::QpMcLinear </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classshark_1_1_qp_mc_linear.html#a09a8a598fe1e6c6c625be0c55b03985a">DatasetType</a> &amp;&#160;</td>
          <td class="paramname"><em>dataset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>dim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>classes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>strategy</em> = <code><a class="el" href="classshark_1_1_qp_mc_linear.html#a844cac01d9113019e1f89de7d0810d79a306e16139b81caaa99ea79d3ede9a712">ACF</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>shrinking</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dataset</td><td>training data </td></tr>
    <tr><td class="paramname">dim</td><td>problem dimension </td></tr>
    <tr><td class="paramname">classes</td><td>number of classes in the problem </td></tr>
    <tr><td class="paramname">strategy</td><td>coordinate selection strategy </td></tr>
    <tr><td class="paramname">shrinking</td><td>flag turning shrinking on and off </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_qp_mc_linear_8h_source.html#l00073">73</a> of file <a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_qp_mc_linear.html#ab724fc27e23748209c439970919afdc1">shark::QpMcLinear&lt; InputT &gt;::m_data</a>, <a class="el" href="classshark_1_1_qp_mc_linear.html#a04cb0e529976e34569d0b6863e36b881">shark::QpMcLinear&lt; InputT &gt;::m_dim</a>, <a class="el" href="classshark_1_1_qp_mc_linear.html#adb2a6e9f3681450a55dd5764648d0cb6">shark::QpMcLinear&lt; InputT &gt;::m_xSquared</a>, and <a class="el" href="_exception_8h.html#a73abb5049a0168d72a48e72dda41708b">SHARK_ASSERT</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a64edc8279169777bf9ef05052a412acd" name="a64edc8279169777bf9ef05052a412acd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a64edc8279169777bf9ef05052a412acd">&#9670;&#160;</a></span>add_scaled()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_qp_mc_linear.html">shark::QpMcLinear</a>&lt; InputT &gt;::add_scaled </td>
          <td>(</td>
          <td class="paramtype">RealMatrix &amp;&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RealVector const &amp;&#160;</td>
          <td class="paramname"><em>mu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classshark_1_1_qp_mc_linear.html#a88e09c2e6decd1e35f0755f0faf982f7">InputReferenceType</a>&#160;</td>
          <td class="paramname"><em>x</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_qp_mc_linear_8h_source.html#l00343">343</a> of file <a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_qp_mc_linear.html#a3deaa3c8d8f3b5a15ffc509ed17a0398">shark::QpMcLinear&lt; InputT &gt;::m_classes</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_qp_mc_linear_w_w.html#a2a6f6e6036ecf905606e62db0dc3816a">shark::QpMcLinearWW&lt; InputT &gt;::updateWeightVectors()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_l_l_w.html#a9c312d2e29afc1323b24d84ca390d2c0">shark::QpMcLinearLLW&lt; InputT &gt;::updateWeightVectors()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_t_s.html#a879e147e3dd09399635bfc2df2f46013">shark::QpMcLinearATS&lt; InputT &gt;::updateWeightVectors()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_m_m_r.html#a93f9f804635fb731f339bf8419776efd">shark::QpMcLinearMMR&lt; InputT &gt;::updateWeightVectors()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_c_s.html#a55c0490023e02754a2cdfad01bfa05ce">shark::QpMcLinearCS&lt; InputT &gt;::updateWeightVectors()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html#ad9c79ecd1418beba9c94b414a8f3b8ef">shark::QpMcLinearADM&lt; InputT &gt;::updateWeightVectors()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_t_m.html#ac3cac29e695f9788bcf6406dffee8bfc">shark::QpMcLinearATM&lt; InputT &gt;::updateWeightVectors()</a>, and <a class="el" href="classshark_1_1_qp_mc_linear_reinforced.html#a17bbc888e42a6144ab9868f1a821809d">shark::QpMcLinearReinforced&lt; InputT &gt;::updateWeightVectors()</a>.</p>

</div>
</div>
<a id="a6ff5650431f4502b6a76e7b79b7ff514" name="a6ff5650431f4502b6a76e7b79b7ff514"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6ff5650431f4502b6a76e7b79b7ff514">&#9670;&#160;</a></span>calcGradient()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual double <a class="el" href="classshark_1_1_qp_mc_linear.html">shark::QpMcLinear</a>&lt; InputT &gt;::calcGradient </td>
          <td>(</td>
          <td class="paramtype">RealVector &amp;&#160;</td>
          <td class="paramname"><em>gradient</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RealVector&#160;</td>
          <td class="paramname"><em>wx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">blas::dense_vector_adaptor&lt; double const &gt; const &amp;&#160;</td>
          <td class="paramname"><em>alpha</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute the gradient from the inner products of the weight vectors with the current sample. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gradient</td><td>gradient vector to be filled in. The vector is correctly sized. </td></tr>
    <tr><td class="paramname">wx</td><td>inner products of weight vectors with the current sample; wx(c) = &lt;w_c, x&gt; </td></tr>
    <tr><td class="paramname">alpha</td><td>variables corresponding to the current sample </td></tr>
    <tr><td class="paramname">C</td><td>upper bound on the variables </td></tr>
    <tr><td class="paramname">y</td><td>label of the current sample</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function must return the violation of the KKT conditions. </dd></dl>

<p>Implemented in <a class="el" href="classshark_1_1_qp_mc_linear_w_w.html#a229d689f6acbd6074b047fea92f90ce3">shark::QpMcLinearWW&lt; InputT &gt;</a>, <a class="el" href="classshark_1_1_qp_mc_linear_l_l_w.html#a5d36501d3f63730064d4439657bcb21f">shark::QpMcLinearLLW&lt; InputT &gt;</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_t_s.html#aa878c63a7b0758bc2ad71d77bc65975f">shark::QpMcLinearATS&lt; InputT &gt;</a>, <a class="el" href="classshark_1_1_qp_mc_linear_m_m_r.html#a63cf5cf3a2059c597bc266cc4cd35674">shark::QpMcLinearMMR&lt; InputT &gt;</a>, <a class="el" href="classshark_1_1_qp_mc_linear_c_s.html#a800c787ffc88f44571a67e66f83d9f2b">shark::QpMcLinearCS&lt; InputT &gt;</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html#af8021dbbe5f3c4b3e5fdc83b941748cd">shark::QpMcLinearADM&lt; InputT &gt;</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_t_m.html#afe91c0937cc28462d3d6d6dbeca8a52d">shark::QpMcLinearATM&lt; InputT &gt;</a>, and <a class="el" href="classshark_1_1_qp_mc_linear_reinforced.html#ab3ba8e3be351d681e3bbba6da830d6a3">shark::QpMcLinearReinforced&lt; InputT &gt;</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_qp_mc_linear.html#a468f877984aab4f95122083bf4a87152">shark::QpMcLinear&lt; InputT &gt;::solve()</a>.</p>

</div>
</div>
<a id="a468f877984aab4f95122083bf4a87152" name="a468f877984aab4f95122083bf4a87152"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a468f877984aab4f95122083bf4a87152">&#9670;&#160;</a></span>solve()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealMatrix <a class="el" href="classshark_1_1_qp_mc_linear.html">shark::QpMcLinear</a>&lt; InputT &gt;::solve </td>
          <td>(</td>
          <td class="paramtype">random::rng_type &amp;&#160;</td>
          <td class="paramname"><em>rng</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structshark_1_1_qp_stopping_condition.html">QpStoppingCondition</a> &amp;&#160;</td>
          <td class="paramname"><em>stop</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structshark_1_1_qp_solution_properties.html">QpSolutionProperties</a> *&#160;</td>
          <td class="paramname"><em>prop</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>verbose</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Solve the SVM training problem. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rng</td><td>random number generator used by the algorithm </td></tr>
    <tr><td class="paramname">C</td><td>regularization constant of the SVM </td></tr>
    <tr><td class="paramname">stop</td><td>stopping condition(s) </td></tr>
    <tr><td class="paramname">prop</td><td>solution properties </td></tr>
    <tr><td class="paramname">verbose</td><td>if true, the solver prints status information and solution statistics </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_qp_mc_linear_8h_source.html#l00103">103</a> of file <a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_qp_mc_linear.html#a844cac01d9113019e1f89de7d0810d79a306e16139b81caaa99ea79d3ede9a712">shark::QpMcLinear&lt; InputT &gt;::ACF</a>, <a class="el" href="classshark_1_1_qp_mc_linear.html#a6ff5650431f4502b6a76e7b79b7ff514">shark::QpMcLinear&lt; InputT &gt;::calcGradient()</a>, <a class="el" href="classshark_1_1_timer.html#a91e2a527ffbe3eabc7c8cf36ff742318">shark::Timer::lastLap()</a>, <a class="el" href="classshark_1_1_qp_mc_linear.html#a3deaa3c8d8f3b5a15ffc509ed17a0398">shark::QpMcLinear&lt; InputT &gt;::m_classes</a>, <a class="el" href="classshark_1_1_qp_mc_linear.html#ab724fc27e23748209c439970919afdc1">shark::QpMcLinear&lt; InputT &gt;::m_data</a>, <a class="el" href="classshark_1_1_qp_mc_linear.html#a04cb0e529976e34569d0b6863e36b881">shark::QpMcLinear&lt; InputT &gt;::m_dim</a>, <a class="el" href="classshark_1_1_qp_mc_linear.html#a4881e1ffbdb28a0f2d0fee00373e4e09">shark::QpMcLinear&lt; InputT &gt;::m_shrinking</a>, <a class="el" href="classshark_1_1_qp_mc_linear.html#ab5489cad6b7a0db6065331414ae21dc7">shark::QpMcLinear&lt; InputT &gt;::m_strategy</a>, <a class="el" href="classshark_1_1_qp_mc_linear.html#adb2a6e9f3681450a55dd5764648d0cb6">shark::QpMcLinear&lt; InputT &gt;::m_xSquared</a>, <a class="el" href="structshark_1_1_qp_stopping_condition.html#af747ff263a208a610fc2ca4dccec44d6">shark::QpStoppingCondition::maxIterations</a>, <a class="el" href="structshark_1_1_qp_stopping_condition.html#a2f2037cc62c817ff88ec0801591a0240">shark::QpStoppingCondition::maxSeconds</a>, <a class="el" href="structshark_1_1_qp_stopping_condition.html#addc2ea7f6d15eb25187586e329f33ace">shark::QpStoppingCondition::minAccuracy</a>, <a class="el" href="namespaceshark.html#a2d5e9a415ae7e8dd41caf883e1873540a4b605bae89750d1c2bb1b3ef1a039639">shark::QpAccuracyReached</a>, <a class="el" href="namespaceshark.html#a2d5e9a415ae7e8dd41caf883e1873540a1f2d9c58ed6b0985decbfe573d66080d">shark::QpMaxIterationsReached</a>, <a class="el" href="namespaceshark.html#a2d5e9a415ae7e8dd41caf883e1873540af0f960c500ba6a3c653c9f45efa6e92a">shark::QpTimeout</a>, <a class="el" href="_exception_8h.html#a73abb5049a0168d72a48e72dda41708b">SHARK_ASSERT</a>, <a class="el" href="classshark_1_1_qp_mc_linear.html#ad1bd9cdcfb10e5aca7c77e16812bae92">shark::QpMcLinear&lt; InputT &gt;::solveSub()</a>, <a class="el" href="classshark_1_1_timer.html#a4d88aa872b2f0eb752c01c506cc24555">shark::Timer::start()</a>, <a class="el" href="classshark_1_1_timer.html#ad3ccd47c0429d28d9600117b5ed57362">shark::Timer::stop()</a>, <a class="el" href="namespaceshark_1_1random.html#a18f302ea18f70835c59935973ba8ea84">shark::random::uni()</a>, <a class="el" href="classshark_1_1_qp_mc_linear.html#a844cac01d9113019e1f89de7d0810d79ac281d0b5f356d094aa5ad039e28cdc35">shark::QpMcLinear&lt; InputT &gt;::UNIFORM</a>, and <a class="el" href="classshark_1_1_qp_mc_linear.html#addbaf611cbd58e4a4e3d07b80a95fbf4">shark::QpMcLinear&lt; InputT &gt;::updateWeightVectors()</a>.</p>

</div>
</div>
<a id="ad1bd9cdcfb10e5aca7c77e16812bae92" name="ad1bd9cdcfb10e5aca7c77e16812bae92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad1bd9cdcfb10e5aca7c77e16812bae92">&#9670;&#160;</a></span>solveSub()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual double <a class="el" href="classshark_1_1_qp_mc_linear.html">shark::QpMcLinear</a>&lt; InputT &gt;::solveSub </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>epsilon</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RealVector &amp;&#160;</td>
          <td class="paramname"><em>gradient</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>q</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">blas::dense_vector_adaptor&lt; double &gt; &amp;&#160;</td>
          <td class="paramname"><em>alpha</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RealVector &amp;&#160;</td>
          <td class="paramname"><em>mu</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Solve the sub-problem posed by a single training example. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">epsilon</td><td>accuracy (dual gradient) up to which the sub-problem should be solved </td></tr>
    <tr><td class="paramname">gradient</td><td>gradient of the objective function w.r.t. alpha </td></tr>
    <tr><td class="paramname">q</td><td>squared norm of the current sample </td></tr>
    <tr><td class="paramname">C</td><td>upper bound on the variables </td></tr>
    <tr><td class="paramname">y</td><td>label of the current sample </td></tr>
    <tr><td class="paramname">alpha</td><td>input: initial point; output: (near) optimal point </td></tr>
    <tr><td class="paramname">mu</td><td>step from initial point to final point</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function must return the gain of the step, i.e., the improvement of the objective function. </dd></dl>

<p>Implemented in <a class="el" href="classshark_1_1_qp_mc_linear_w_w.html#ac24ff73630263bee2b552222196d7ca6">shark::QpMcLinearWW&lt; InputT &gt;</a>, <a class="el" href="classshark_1_1_qp_mc_linear_l_l_w.html#a5d146ba6191a078d4d02ef0f385c1f66">shark::QpMcLinearLLW&lt; InputT &gt;</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_t_s.html#ab28cf05fe5056dee19e00821473f62b6">shark::QpMcLinearATS&lt; InputT &gt;</a>, <a class="el" href="classshark_1_1_qp_mc_linear_m_m_r.html#a08dec16354913fbbad8e3628b608c4e1">shark::QpMcLinearMMR&lt; InputT &gt;</a>, <a class="el" href="classshark_1_1_qp_mc_linear_c_s.html#a8de556a5e4be31c01350c6b0c125e17e">shark::QpMcLinearCS&lt; InputT &gt;</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html#a81cde691765509bedeafe49950a4f55f">shark::QpMcLinearADM&lt; InputT &gt;</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_t_m.html#a2844a08c891b42cacec77f53b4e7a1ce">shark::QpMcLinearATM&lt; InputT &gt;</a>, and <a class="el" href="classshark_1_1_qp_mc_linear_reinforced.html#aa5609174ae0b3735e073e828f2a8839b">shark::QpMcLinearReinforced&lt; InputT &gt;</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_qp_mc_linear.html#a468f877984aab4f95122083bf4a87152">shark::QpMcLinear&lt; InputT &gt;::solve()</a>.</p>

</div>
</div>
<a id="addbaf611cbd58e4a4e3d07b80a95fbf4" name="addbaf611cbd58e4a4e3d07b80a95fbf4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#addbaf611cbd58e4a4e3d07b80a95fbf4">&#9670;&#160;</a></span>updateWeightVectors()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classshark_1_1_qp_mc_linear.html">shark::QpMcLinear</a>&lt; InputT &gt;::updateWeightVectors </td>
          <td>(</td>
          <td class="paramtype">RealMatrix &amp;&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RealVector const &amp;&#160;</td>
          <td class="paramname"><em>mu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Update the weight vectors (primal variables) after a step on the dual variables. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">w</td><td>matrix of (dense) weight vectors (as rows) </td></tr>
    <tr><td class="paramname">mu</td><td>dual step on the variables corresponding to the current sample </td></tr>
    <tr><td class="paramname">index</td><td>current sample </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classshark_1_1_qp_mc_linear_w_w.html#a2a6f6e6036ecf905606e62db0dc3816a">shark::QpMcLinearWW&lt; InputT &gt;</a>, <a class="el" href="classshark_1_1_qp_mc_linear_l_l_w.html#a9c312d2e29afc1323b24d84ca390d2c0">shark::QpMcLinearLLW&lt; InputT &gt;</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_t_s.html#a879e147e3dd09399635bfc2df2f46013">shark::QpMcLinearATS&lt; InputT &gt;</a>, <a class="el" href="classshark_1_1_qp_mc_linear_m_m_r.html#a93f9f804635fb731f339bf8419776efd">shark::QpMcLinearMMR&lt; InputT &gt;</a>, <a class="el" href="classshark_1_1_qp_mc_linear_c_s.html#a55c0490023e02754a2cdfad01bfa05ce">shark::QpMcLinearCS&lt; InputT &gt;</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html#ad9c79ecd1418beba9c94b414a8f3b8ef">shark::QpMcLinearADM&lt; InputT &gt;</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_t_m.html#ac3cac29e695f9788bcf6406dffee8bfc">shark::QpMcLinearATM&lt; InputT &gt;</a>, and <a class="el" href="classshark_1_1_qp_mc_linear_reinforced.html#a17bbc888e42a6144ab9868f1a821809d">shark::QpMcLinearReinforced&lt; InputT &gt;</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_qp_mc_linear.html#a468f877984aab4f95122083bf4a87152">shark::QpMcLinear&lt; InputT &gt;::solve()</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a3deaa3c8d8f3b5a15ffc509ed17a0398" name="a3deaa3c8d8f3b5a15ffc509ed17a0398"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3deaa3c8d8f3b5a15ffc509ed17a0398">&#9670;&#160;</a></span>m_classes</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t <a class="el" href="classshark_1_1_qp_mc_linear.html">shark::QpMcLinear</a>&lt; InputT &gt;::m_classes</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>number of classes </p>

<p class="definition">Definition at line <a class="el" href="_qp_mc_linear_8h_source.html#l00382">382</a> of file <a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_qp_mc_linear.html#a64edc8279169777bf9ef05052a412acd">shark::QpMcLinear&lt; InputT &gt;::add_scaled()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_l_l_w.html#a5d36501d3f63730064d4439657bcb21f">shark::QpMcLinearLLW&lt; InputT &gt;::calcGradient()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_t_s.html#aa878c63a7b0758bc2ad71d77bc65975f">shark::QpMcLinearATS&lt; InputT &gt;::calcGradient()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_m_m_r.html#a63cf5cf3a2059c597bc266cc4cd35674">shark::QpMcLinearMMR&lt; InputT &gt;::calcGradient()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_c_s.html#a800c787ffc88f44571a67e66f83d9f2b">shark::QpMcLinearCS&lt; InputT &gt;::calcGradient()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html#af8021dbbe5f3c4b3e5fdc83b941748cd">shark::QpMcLinearADM&lt; InputT &gt;::calcGradient()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_t_m.html#afe91c0937cc28462d3d6d6dbeca8a52d">shark::QpMcLinearATM&lt; InputT &gt;::calcGradient()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_reinforced.html#ab3ba8e3be351d681e3bbba6da830d6a3">shark::QpMcLinearReinforced&lt; InputT &gt;::calcGradient()</a>, <a class="el" href="classshark_1_1_qp_mc_linear.html#a468f877984aab4f95122083bf4a87152">shark::QpMcLinear&lt; InputT &gt;::solve()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_w_w.html#ac24ff73630263bee2b552222196d7ca6">shark::QpMcLinearWW&lt; InputT &gt;::solveSub()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_l_l_w.html#a5d146ba6191a078d4d02ef0f385c1f66">shark::QpMcLinearLLW&lt; InputT &gt;::solveSub()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_t_s.html#ab28cf05fe5056dee19e00821473f62b6">shark::QpMcLinearATS&lt; InputT &gt;::solveSub()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_m_m_r.html#a08dec16354913fbbad8e3628b608c4e1">shark::QpMcLinearMMR&lt; InputT &gt;::solveSub()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_c_s.html#a8de556a5e4be31c01350c6b0c125e17e">shark::QpMcLinearCS&lt; InputT &gt;::solveSub()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html#a81cde691765509bedeafe49950a4f55f">shark::QpMcLinearADM&lt; InputT &gt;::solveSub()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_t_m.html#a2844a08c891b42cacec77f53b4e7a1ce">shark::QpMcLinearATM&lt; InputT &gt;::solveSub()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_reinforced.html#aa5609174ae0b3735e073e828f2a8839b">shark::QpMcLinearReinforced&lt; InputT &gt;::solveSub()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_w_w.html#a2a6f6e6036ecf905606e62db0dc3816a">shark::QpMcLinearWW&lt; InputT &gt;::updateWeightVectors()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_l_l_w.html#a9c312d2e29afc1323b24d84ca390d2c0">shark::QpMcLinearLLW&lt; InputT &gt;::updateWeightVectors()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_t_s.html#a879e147e3dd09399635bfc2df2f46013">shark::QpMcLinearATS&lt; InputT &gt;::updateWeightVectors()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_m_m_r.html#a93f9f804635fb731f339bf8419776efd">shark::QpMcLinearMMR&lt; InputT &gt;::updateWeightVectors()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_c_s.html#a55c0490023e02754a2cdfad01bfa05ce">shark::QpMcLinearCS&lt; InputT &gt;::updateWeightVectors()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html#ad9c79ecd1418beba9c94b414a8f3b8ef">shark::QpMcLinearADM&lt; InputT &gt;::updateWeightVectors()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_t_m.html#ac3cac29e695f9788bcf6406dffee8bfc">shark::QpMcLinearATM&lt; InputT &gt;::updateWeightVectors()</a>, and <a class="el" href="classshark_1_1_qp_mc_linear_reinforced.html#a17bbc888e42a6144ab9868f1a821809d">shark::QpMcLinearReinforced&lt; InputT &gt;::updateWeightVectors()</a>.</p>

</div>
</div>
<a id="ab724fc27e23748209c439970919afdc1" name="ab724fc27e23748209c439970919afdc1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab724fc27e23748209c439970919afdc1">&#9670;&#160;</a></span>m_data</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_data_view.html">DataView</a>&lt;const <a class="el" href="classshark_1_1_qp_mc_linear.html#a09a8a598fe1e6c6c625be0c55b03985a">DatasetType</a>&gt; <a class="el" href="classshark_1_1_qp_mc_linear.html">shark::QpMcLinear</a>&lt; InputT &gt;::m_data</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>view on training data </p>

<p class="definition">Definition at line <a class="el" href="_qp_mc_linear_8h_source.html#l00379">379</a> of file <a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_qp_mc_linear.html#a257f16d453818fb33a9b32d8dd7c6bf2">shark::QpMcLinear&lt; InputT &gt;::QpMcLinear()</a>, <a class="el" href="classshark_1_1_qp_mc_linear.html#a468f877984aab4f95122083bf4a87152">shark::QpMcLinear&lt; InputT &gt;::solve()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_w_w.html#a2a6f6e6036ecf905606e62db0dc3816a">shark::QpMcLinearWW&lt; InputT &gt;::updateWeightVectors()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_l_l_w.html#a9c312d2e29afc1323b24d84ca390d2c0">shark::QpMcLinearLLW&lt; InputT &gt;::updateWeightVectors()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_t_s.html#a879e147e3dd09399635bfc2df2f46013">shark::QpMcLinearATS&lt; InputT &gt;::updateWeightVectors()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_m_m_r.html#a93f9f804635fb731f339bf8419776efd">shark::QpMcLinearMMR&lt; InputT &gt;::updateWeightVectors()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_c_s.html#a55c0490023e02754a2cdfad01bfa05ce">shark::QpMcLinearCS&lt; InputT &gt;::updateWeightVectors()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_d_m.html#ad9c79ecd1418beba9c94b414a8f3b8ef">shark::QpMcLinearADM&lt; InputT &gt;::updateWeightVectors()</a>, <a class="el" href="classshark_1_1_qp_mc_linear_a_t_m.html#ac3cac29e695f9788bcf6406dffee8bfc">shark::QpMcLinearATM&lt; InputT &gt;::updateWeightVectors()</a>, and <a class="el" href="classshark_1_1_qp_mc_linear_reinforced.html#a17bbc888e42a6144ab9868f1a821809d">shark::QpMcLinearReinforced&lt; InputT &gt;::updateWeightVectors()</a>.</p>

</div>
</div>
<a id="a04cb0e529976e34569d0b6863e36b881" name="a04cb0e529976e34569d0b6863e36b881"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a04cb0e529976e34569d0b6863e36b881">&#9670;&#160;</a></span>m_dim</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t <a class="el" href="classshark_1_1_qp_mc_linear.html">shark::QpMcLinear</a>&lt; InputT &gt;::m_dim</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>input space dimension </p>

<p class="definition">Definition at line <a class="el" href="_qp_mc_linear_8h_source.html#l00381">381</a> of file <a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_qp_mc_linear.html#a257f16d453818fb33a9b32d8dd7c6bf2">shark::QpMcLinear&lt; InputT &gt;::QpMcLinear()</a>, and <a class="el" href="classshark_1_1_qp_mc_linear.html#a468f877984aab4f95122083bf4a87152">shark::QpMcLinear&lt; InputT &gt;::solve()</a>.</p>

</div>
</div>
<a id="a4881e1ffbdb28a0f2d0fee00373e4e09" name="a4881e1ffbdb28a0f2d0fee00373e4e09"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4881e1ffbdb28a0f2d0fee00373e4e09">&#9670;&#160;</a></span>m_shrinking</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classshark_1_1_qp_mc_linear.html">shark::QpMcLinear</a>&lt; InputT &gt;::m_shrinking</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>apply shrinking or not? </p>

<p class="definition">Definition at line <a class="el" href="_qp_mc_linear_8h_source.html#l00384">384</a> of file <a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_qp_mc_linear.html#a468f877984aab4f95122083bf4a87152">shark::QpMcLinear&lt; InputT &gt;::solve()</a>.</p>

</div>
</div>
<a id="ab5489cad6b7a0db6065331414ae21dc7" name="ab5489cad6b7a0db6065331414ae21dc7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab5489cad6b7a0db6065331414ae21dc7">&#9670;&#160;</a></span>m_strategy</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t <a class="el" href="classshark_1_1_qp_mc_linear.html">shark::QpMcLinear</a>&lt; InputT &gt;::m_strategy</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>strategy for coordinate selection </p>

<p class="definition">Definition at line <a class="el" href="_qp_mc_linear_8h_source.html#l00383">383</a> of file <a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_qp_mc_linear.html#a468f877984aab4f95122083bf4a87152">shark::QpMcLinear&lt; InputT &gt;::solve()</a>.</p>

</div>
</div>
<a id="adb2a6e9f3681450a55dd5764648d0cb6" name="adb2a6e9f3681450a55dd5764648d0cb6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb2a6e9f3681450a55dd5764648d0cb6">&#9670;&#160;</a></span>m_xSquared</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector <a class="el" href="classshark_1_1_qp_mc_linear.html">shark::QpMcLinear</a>&lt; InputT &gt;::m_xSquared</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>diagonal entries of the quadratic matrix </p>

<p class="definition">Definition at line <a class="el" href="_qp_mc_linear_8h_source.html#l00380">380</a> of file <a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_qp_mc_linear.html#a257f16d453818fb33a9b32d8dd7c6bf2">shark::QpMcLinear&lt; InputT &gt;::QpMcLinear()</a>, and <a class="el" href="classshark_1_1_qp_mc_linear.html#a468f877984aab4f95122083bf4a87152">shark::QpMcLinear&lt; InputT &gt;::solve()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/shark/Algorithms/QP/<a class="el" href="_qp_mc_linear_8h_source.html">QpMcLinear.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
